const path = require('path')
const express = require('express')
const app = new express();
const port = process.env.PORT || 80;

app.use(express.static('public'));
app.get('/', (req, res) => {
  res.sendFile(path.join(__dirname, 'views', 'index.html'));
})
app.get('/index.html', (req, res) => {
  res.sendFile(path.join(__dirname, 'views', 'index.html'));
})
app.get('/fly.html', (req, res) => {
  res.sendFile(path.join(__dirname, 'views', 'fly.html'));
})
app.get('/about.html', (req, res) => {
  res.sendFile(path.join(__dirname, 'views', 'about.html'));
})
app.get('/customer.html', (req, res) => {
  res.sendFile(path.join(__dirname, 'views', 'customer.html'));
})
app.get('/business.html', (req, res) => {
  res.sendFile(path.join(__dirname, 'views', 'business.html'));
})

app.listen(port, (error) => {
  if (error) {
    console.error(error);
  } else {
    console.info('==> Listening on port %s. Open up http://localhost:%s/ in your browser.', port, port);
  }
});
